package com.jack006.api.controller.admin;

import com.jack006.grace.result.GraceJSONResult;
import com.jack006.pojo.bo.SaveFriendLinkBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
 * @Classname FriendLinkControllerApi
 * @Description 友情接口接口定义类
 * @Date 2021-06-10 08:15
 * @Created by jack
 */
@Api(value = "首页友情链接维护",tags = "首页友情链接维护的 controller")
@RequestMapping("/friendLinkMng")
public interface FriendLinkControllerApi {


    @ApiOperation(value = "新增或者修改友情链接",notes = "新增或者修改友情链接",httpMethod = "POST")
    @PostMapping("/saveOrUpdateFriendLink")
    GraceJSONResult saveOrUpdateFriendLink(@Valid @RequestBody SaveFriendLinkBO saveFriendLinkBO,
                               HttpServletRequest request,
                               HttpServletResponse response);

    @ApiOperation(value = "查询友情链接列表",notes = "查询友情链接列表",httpMethod = "POST")
    @PostMapping("/getFriendLinkList")
    GraceJSONResult getFriendLinkList();

    @ApiOperation(value = "删除友情链接",notes = "删除友情链接",httpMethod = "POST")
    @PostMapping("/delete")
    GraceJSONResult delete(@RequestParam String linkId);

    @ApiOperation(value = "门户查询友情链接列表",notes = "门户查询友情链接列表",httpMethod = "GET")
    @GetMapping("/portal/list")
    GraceJSONResult queryPortalAllFriendLinkList();

}
